home *** CD-ROM | disk | FTP | other *** search
-
-
-
- GGGGEEEETTTTPPPPRRRROOOOTTTTOOOOEEEENNNNTTTT((((3333NNNN)))) GGGGEEEETTTTPPPPRRRROOOOTTTTOOOOEEEENNNNTTTT((((3333NNNN))))
-
-
-
- NNNNAAAAMMMMEEEE
- getprotoent, getprotobynumber, getprotobyname, getprotoent_r,
- getprotobynumber_r, getprotobyname_r, fgetprotoent, fgetprotoent_r,
- setprotoent, endprotoent - get protocol entry
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<nnnneeeettttddddbbbb....hhhh>>>>
-
- ssssttttrrrruuuucccctttt pppprrrroooottttooooeeeennnntttt ****ggggeeeettttpppprrrroooottttooooeeeennnntttt((((vvvvooooiiiidddd))));;;;
-
- ssssttttrrrruuuucccctttt pppprrrroooottttooooeeeennnntttt ****ggggeeeettttpppprrrroooottttooooeeeennnntttt____rrrr((((ssssttttrrrruuuucccctttt pppprrrroooottttooooeeeennnntttt ****eeeennnnttttrrrryyyy,,,, cccchhhhaaaarrrr ****bbbbuuuuffffffffeeeerrrr,,,, iiiinnnntttt bbbbuuuufffflllleeeennnn))));;;;
-
- ssssttttrrrruuuucccctttt pppprrrroooottttooooeeeennnntttt ****ggggeeeettttpppprrrroooottttoooobbbbyyyynnnnaaaammmmeeee((((ccccoooonnnnsssstttt cccchhhhaaaarrrr ****nnnnaaaammmmeeee))));;;;
-
- ssssttttrrrruuuucccctttt pppprrrroooottttooooeeeennnntttt ****ggggeeeettttpppprrrroooottttoooobbbbyyyynnnnaaaammmmeeee____rrrr((((ccccoooonnnnsssstttt cccchhhhaaaarrrr ****nnnnaaaammmmeeee,,,, ssssttttrrrruuuucccctttt pppprrrroooottttooooeeeennnntttt ****eeeennnnttttrrrryyyy,,,, cccchhhhaaaarrrr ****bbbbuuuuffffffffeeeerrrr,,,, iiiinnnntttt bbbbuuuufffflllleeeennnn))));;;;
-
- ssssttttrrrruuuucccctttt pppprrrroooottttooooeeeennnntttt ****ggggeeeettttpppprrrroooottttoooobbbbyyyynnnnuuuummmmbbbbeeeerrrr((((iiiinnnntttt pppprrrroooottttoooo))));;;;
-
- ssssttttrrrruuuucccctttt pppprrrroooottttooooeeeennnntttt ****ggggeeeettttpppprrrroooottttoooobbbbyyyynnnnuuuummmmbbbbeeeerrrr____rrrr((((iiiinnnntttt pppprrrroooottttoooo,,,, ssssttttrrrruuuucccctttt pppprrrroooottttooooeeeennnntttt ****eeeennnnttttrrrryyyy,,,, cccchhhhaaaarrrr ****bbbbuuuuffffffffeeeerrrr,,,, iiiinnnntttt bbbbuuuufffflllleeeennnn))));;;;
-
- ssssttttrrrruuuucccctttt pppprrrroooottttooooeeeennnntttt ****ffffggggeeeettttpppprrrroooottttooooeeeennnntttt((((FFFFIIIILLLLEEEE ****ffff))));;;;
-
- ssssttttrrrruuuucccctttt pppprrrroooottttooooeeeennnntttt ****ffffggggeeeettttpppprrrroooottttooooeeeennnntttt____rrrr((((FFFFIIIILLLLEEEE ****ffff,,,, ssssttttrrrruuuucccctttt pppprrrroooottttooooeeeennnntttt ****eeeennnnttttrrrryyyy,,,, cccchhhhaaaarrrr ****bbbbuuuuffffffffeeeerrrr,,,, iiiinnnntttt bbbbuuuufffflllleeeennnn))));;;;
-
- vvvvooooiiiidddd sssseeeettttpppprrrroooottttooooeeeennnntttt((((iiiinnnntttt ssssttttaaaayyyyooooppppeeeennnn))));;;;
-
- vvvvooooiiiidddd eeeennnnddddpppprrrroooottttooooeeeennnntttt((((vvvvooooiiiidddd))))
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _g_e_t_p_r_o_t_o_e_n_t, _g_e_t_p_r_o_t_o_b_y_n_a_m_e, and _g_e_t_p_r_o_t_o_b_y_n_u_m_b_e_r each return a pointer
- to an object with the following structure containing the broken-out
- fields of a line in the network protocol data base file, /_e_t_c/_p_r_o_t_o_c_o_l_s,
- or the NIS _p_r_o_t_o_c_o_l_s map.
-
- struct protoent {
- char *p_name; /* official name of protocol */
- char **p_aliases; /* alias list */
- int p_proto; /* protocol number */
- };
-
- The members of this structure are:
-
- p_name The official name of the protocol.
-
- p_aliases A zero terminated list of alternate names for the protocol.
-
- p_proto The protocol number.
-
- _G_e_t_p_r_o_t_o_e_n_t reads the next line of the file, opening the file if
- necessary.
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- GGGGEEEETTTTPPPPRRRROOOOTTTTOOOOEEEENNNNTTTT((((3333NNNN)))) GGGGEEEETTTTPPPPRRRROOOOTTTTOOOOEEEENNNNTTTT((((3333NNNN))))
-
-
-
- _S_e_t_p_r_o_t_o_e_n_t opens and rewinds the file. If the _s_t_a_y_o_p_e_n flag is non-
- zero, the net data base will not be closed after each call to
- _g_e_t_p_r_o_t_o_b_y_n_a_m_e or _g_e_t_p_r_o_t_o_b_y_n_u_m_b_e_r.
-
- _E_n_d_p_r_o_t_o_e_n_t closes the file.
-
- _G_e_t_p_r_o_t_o_b_y_n_a_m_e and _g_e_t_p_r_o_t_o_b_y_n_u_m_b_e_r sequentially search from the
- beginning of the file until a matching protocol name or protocol number
- is found, or until EOF is encountered.
-
- The primitives documented in this manual entry first consult Sun's NIS
- distributed lookup service, if NIS is enabled, and then the file
- /_e_t_c/_p_r_o_t_o_c_o_l_s.
-
- _g_e_t_p_r_o_t_o_e_n_t__r, _g_e_t_p_r_o_t_o_b_y_n_u_m_b_e_r__r and _g_e_t_p_r_o_t_o_b_y_n_a_m_e__r are reentrant
- versions of the corresponding function calls.
-
- _f_g_e_t_p_r_o_t_o_e_n_t and _f_g_e_t_p_r_o_t_o_e_n_t__r will read entries off of the passed file
- handle.
-
- NNNNOOOOTTTTEEEE
- The Mips ABI specifies nothing but local files so applications which wish
- to use anything else must compile with libc prior to libnsl in the
- library list. When nsd is running changes to the local protocols file
- may not be noticed by getprotoent() until the enumeration cache file has
- timed out.
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- All functions that return struct protoent * will return a null (0)
- pointer in the case of EOF or failure.
-
- FFFFIIIILLLLEEEESSSS
- /etc/protocols
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- ypserv(1M), protocols(4)
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- Null pointer (0) returned on EOF or error.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-